package com.wyc.apidriver.service.impl;


import com.wyc.apidriver.feign.DriverUserFeignClient;
import com.wyc.apidriver.service.DriverUserService;
import com.wyc.internalCommon.request.DriverUserDTO;
import com.wyc.internalCommon.request.DriverUserWorkStatusDTO;
import com.wyc.internalCommon.result.ApiResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DriverUserServiceImpl implements DriverUserService {

    @Autowired
    private DriverUserFeignClient driverUserFeignClient;

    /**
     * 新增或修改司机信息
     * @param driverUserDTO
     * @return
     */
    @Override
    public ApiResult addDriverUser(DriverUserDTO driverUserDTO) {
        return driverUserFeignClient.insert(driverUserDTO);
    }

    /**
     * 修改司机工作状态
     * @param workStatusDTO
     * @return
     */
    @Override
    public ApiResult updateWorkStatus(DriverUserWorkStatusDTO workStatusDTO) {

        return driverUserFeignClient.updateWorkStatus(workStatusDTO);
    }
}
